<?php
/**
 * Group forum topic create river view.
 */

$object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);

$responses = '';
// if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) {
// 	// inline comment form
// 	$form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden');
// 	$body_vars = array('entity' => $object, 'inline' => true);
// 	$responses = elgg_view_form('review/reply/save', $form_vars, $body_vars);
// }

echo elgg_view('river/elements/layout', array(
	'item' => $vars['item'],
	'message' => $excerpt,
	'responses' => $responses,
));

// $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
// $object = get_entity($vars['item']->object_guid);
// $url = $object->getURL();

// $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
// $string = sprintf(elgg_echo("file:river:created"),$url) . " ";
// $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("file:river:item") . "</a>";

// echo $string;

// ?>